package cn.wolfcode.mapper;

import cn.wolfcode.domain.Notice;
import cn.wolfcode.qo.NoticeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NoticeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Notice record);

    Notice selectByPrimaryKey(Long id);

    List<Notice> selectAll();

    int updateByPrimaryKey(Notice record);
    // 分页查询
    List<Notice> selectForList(NoticeQueryObject qo);
    List<Notice> selectByIssue(NoticeQueryObject qo);

    void updateRead(@Param("nId") Long nId, @Param("eId") Long eId);

    void insertRelation(@Param("employeeId") Long employeeId, @Param("noticeId") Long noticeId, @Param("haveRead") int haveRead);

    void updateIssue(Long id);

    void updateRemove(Long id);
}